import 'package:flutter/material.dart';
import 'package:flutter_base/base/widget/base_get_builder.dart';
import 'package:flutter_base/pages/mine/wallet/wallet_coin_details/wallet_coin_details_consumption/wallet_coin_details_consumption_view.dart';
import 'package:flutter_base/pages/mine/wallet/wallet_coin_details/wallet_coin_details_recharge/wallet_coin_details_recharge_view.dart';
import 'package:flutter_base/widgets/appbar/common_app_bar.dart';
import 'package:flutter_base/widgets/tab/common_two_tab_bar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import 'wallet_coin_details_logic.dart';

class WalletCoinDetailsPage extends StatelessWidget {
  WalletCoinDetailsPage({Key? key}) : super(key: key);

  final WalletCoinDetailsLogic logic = Get.put(WalletCoinDetailsLogic());

  @override
  Widget build(BuildContext context) {
    return BaseGetBuilder<WalletCoinDetailsLogic>(
      appBar: const CommonAppBar(title: 'Coin Details'),
      builder: (logic) {
        return Column(
          children: [
            Padding(
              padding: EdgeInsets.symmetric(horizontal: 26.w),
              child: CommonTwoTabBar(
                  tabController: logic.tabController, tabs: logic.tabs),
            ),
            Expanded(
                child: Padding(
              padding: EdgeInsets.symmetric(horizontal: 16.w),
              child: TabBarView(controller: logic.tabController, children: [
                WalletCoinDetailsRechargePage(),
                WalletCoinDetailsConsumptionPage(),
              ]),
            ))
          ],
        );
      },
    );
  }
}
